package com.ruoyi.system.domain.WMS;

import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.system.domain.function.ProdOrderDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @description: 齐配套参数实体类
 * @author: zhengxiong.jiang
 * @createDate: 2023/3/2
 * @version: 1.0
 */
@Data
public class QptWmsDTO {

    @ApiModelProperty(value = "工厂编码")
    private String factoryid;

    @ApiModelProperty(value = "操作人员")
    private String transferman;

    @ApiModelProperty(value = "工单号")
    private String billno;

    @ApiModelProperty(value = "wms返回的工单号")
    private String wmsbillno;

    @ApiModelProperty(value = "华为任务令")
    private String taskTon;

    @ApiModelProperty(value = "客户id")
    private String customerId;

    @ApiModelProperty(value = "传输时间")
    private String transfertime;

    @ApiModelProperty(value = "物料清单")
    private List<MaterialDataWmsDTO> materielListDtos;

    public QptWmsDTO(){

    }

    public QptWmsDTO(ProdOrderDTO dto){
        this.billno = dto.getOrderCode();
        this.taskTon = dto.getTaskTon();
        this.customerId = dto.getCustomerCode();
        this.transfertime = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss");
    }
}
